import sys  
import qrcode
 
imagefile = '%s.png' % (sys.argv[2])

qr=qrcode.QRCode(version=2,
                 error_correction=qrcode.constants.ERROR_CORRECT_L,
                 box_size=8,
                 border=20,
                 )

data = '%s' % (sys.argv[1])

qr.add_data(data)
qr.make(fit=True)
img = qr.make_image()
img.save(imagefile)


